
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>图片放大效果2</title>
</head>
<style type="text/css">
.picBox{width: 405px;height: 405px;margin: 0 auto;position: relative;}
.picBox .small{float: left;border:1px solid #fff;}
.picBox .big{display: none;width: 0px;height: 0px;position: absolute;}
.lt{top:0;left:0;}
.rt{top:0;right:0;}
.lb{left: 0;bottom: 0;}
.rb{right:0;bottom: 0;}
</style>
<script language="javascript" src="js/jquery-1.11.1.js"></script>
<script type="text/javascript">
  
  $(function(){

      var i = 0;
      var interTimer = null;
      interTimer = setInterval(function(){

        movePic();

      },1000)


      function movePic(){
          
          if(i > 3)
          {
            i = 0;
          }
          $(".big").eq(i).show();
          $(".big").eq(i).animate({'width': 405, 'height': 405},1500,function(){
                 $(this).hide();
                 $(this).css({
                   'width': 0,
                   'height': 0
                 });
           });

          i++;

      }


    
  })
</script>
<body>
  <div class="picBox">
      <img src="images/small1.jpg" alt="" class="small" />
      <img src="images/small2.jpg" alt="" class="small" />
      <img src="images/small3.jpg" alt="" class="small" />
      <img src="images/small4.jpg" alt="" class="small" />
      <img src="images/big1.jpg" alt="" class="big lt" />
      <img src="images/big2.jpg" alt="" class="big rt" />
      <img src="images/big3.jpg" alt="" class="big lb" />
      <img src="images/big4.jpg" alt="" class="big rb" />
  </div>
</body>
</html>
